<?php
    include_once 'fun.php';
    include_once 'islogin.php';
    $_SESSION['isadmin']=isset($_SESSION['isadmin'])?$_SESSION['isadmin']:'';
    if ($_SESSION['isadmin']!=1&&$_SESSION['isadmin']!=-1) {
        header('Refresh:1;url=shop.php');
        die("请以库存管理员身份登录");
    }
    $id=$_GET['id'];
    $sql = "delete from product where productid = '{$id}'";
    $con=connect();
    query($sql,$con);
    echo "<script>
			
			location.href='stock.php';
	</script>";
?>